import java.util.Scanner;

/**
 * @author vivi
 * @description
 * @date 2024/5/29
 */
public class demo1 {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
        int[] hash = new int[26]; // 记录每个元素出现的次数
        int max = 0;
        char ret = 0;

        while (scanner.hasNext()) {
            char[] s = scanner.next().toCharArray();
            for (char ch : s) {
                if (++ hash[ch - 'a'] > max) {
                    ret = ch;
                    max = hash[ch - 'a'];
                }
            }

        }
        System.out.println(ret);
    }
}
